package gui.catalogues.customElements;

import java.awt.BorderLayout;
import java.util.List;

import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;

public class TablePanel extends JPanel {
	JTable table;
	
	public TablePanel() {
		initVariables();
		manageLayout();
		manageListeners();
	}
	
	public TablePanel(AbstractTableModel tableModel) {
		initVariables(tableModel);
		manageLayout();
		manageListeners();
	}
	
	public void initVariables() {
		table = new JTable();
	}
		
	public void initVariables(AbstractTableModel tableModel) {
		table = new JTable(tableModel);
	}
	public void manageLayout() {
		setLayout(new BorderLayout());
		add(table, BorderLayout.CENTER);
	}
	public void manageListeners() {
		
	}
	public void setTableData(List<Object> obj) {
//		tableModel.
	}
}
